<template>
  <div>
    详情---{{ id }}

    <dl>
      <dt><img :src="v.image" alt="" width="100%"></dt>
      <dd>
        <h3>{{ v.title }}</h3>
        <p>{{ v.desc }}</p>
      </dd>
    </dl>
  </div>
</template>


<script setup>
import axios from 'axios';
import { ref } from 'vue';
import { useRoute } from 'vue-router'
const route = useRoute()
const id = route.params.id
const v = ref({})

const getDetail = async () => {
  const resp = await axios.get('/api/list/detail', { params: { id } });
  console.log(resp.data)
  v.value = resp.data
}

getDetail()



</script>